package cn.itheima.controller;
/*
* 控制层
* */
import cn.itheima.domain.Student;
import cn.itheima.service.StudentService;
import cn.itheima.service.impl.StudentServiceImpl;

import java.util.ArrayList;

public class StudentController {
    public static void main(String[] args) {
        StudentService service1 = new StudentServiceImpl();
        ArrayList<Student> list = service1.findAll();
        for (Student stu : list) {
            System.out.println(stu);
        }
        System.out.println("-------------------------");
        findById();
    }
    public static void findById() {
        StudentService service1 = new StudentServiceImpl();
        Student stu = service1.findById(3);
        System.out.println(stu);
    }


}
